<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2016/11/1
  Time: 23:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="UTF-8"  %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>体检预约平台</title>
    <link rel="shortcut icon" href="${ctx}/static/inspinia/img/favicon.ico" />
    <link href="${ctx}/static/inspinia/css/bootstrap.min.css" rel="stylesheet">
    <link href="${ctx}/static/inspinia/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="${ctx}/static/inspinia/css/animate.css" rel="stylesheet">
    <link href="${ctx}/static/inspinia/css/plugins/jsTree/style.min.css" rel="stylesheet">
    <link href="${ctx}/static/inspinia/css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="${ctx}/static/inspinia/css/style.css" rel="stylesheet">
    <link rel="stylesheet" href="${ctx}/static/inspinia/css/yj-style.css">
</head>
<body>
<div id="wrapper">
    <nav class="navbar-default navbar-static-side" id="left-slider" role="navigation">

            <div id="sliders_top">
            <h2 class="nav-logo-title" style=" font-size: 18px;">
                <c:forEach items="${modules}" var="menu">
                    <c:if test="${menu.module.title == '单位端'}">体检预约平台-单位端</c:if>
                    <c:if test="${menu.module.title == '体检中心'}">体检预约平台-体检中心端</c:if>
                    <c:if test="${menu.module.title == '系统管理'}">体检预约平台-管理端</c:if>
                </c:forEach>
            </h2>
            <div class="nav-header">
                <div class="dropdown profile-element"> <span style=" float: left; margin-right: 12px;">
                        <img alt="image" width="46px" height="46px" class="img-circle" style="margin-top:-8px" src="${ctx}/static/inspinia/img/profile_small.jpg" />
                         </span>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                                    <span class="block"> <strong class="font-bold"><shiro:user><shiro:principal property="name"/></shiro:user></strong></span>
                                    <span class="block"> ${position}</span>
                                    <span class="text-muted text-xs block"><shiro:hasRole name="1">超级管理员</shiro:hasRole><shiro:hasRole name="2">普通管理员</shiro:hasRole>  <b class="caret"></b></span>
                                </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t">
                        <li><a href="javascript:;"><i class="fa fa-file-text"></i>档案</a></li>
                        <li><a href="javascript:psdchang();"><i class="fa fa-cog"></i>密码修改</a></li>
                        <li><a href="${ctx}/logout"><i class="fa fa-sign-out"></i>退出</a></li>
                    </ul>
                </div>
                <div class="logo-element">
                    <img style="width:80%;height:80%;" src="${ctx}/static/inspinia/img/logo-icon.png" alt="">
                </div>
            </div>
        </div>
        <div class="sidebar-collapse">
            <ul class="nav metismenu" id="side-menu">
                <c:forEach items="${modules}" var="menu">
                    <li>
                        <a ${menu.module.url !='#' ? "data-rel=\"page\" data-onload=\"iframe\"" : ""} href="javascript:void(0);" data-href="${ctx}${menu.module.url}" data-title="${menu.module.title}" data-id="menu-${menu.module.id}" ><i class="fa ${menu.module.ico}"></i> <span class="nav-label">${menu.module.title}</span> <c:if test="${menu.childs.size()>0}"><span class="fa arrow"></span></c:if></a>
                        <c:if test="${menu.childs.size()>0}">
                            <ul class="nav nav-second-level collapse">
                                <c:forEach items="${menu.childs}" var="child">
                                    <li>
                                        <a href="javascript:void(0);" data-rel="page" data-href="${ctx}${child.module.url}" data-title="${child.module.title}" data-id="menu-${child.module.id}" data-onload="iframe">${child.module.title}</a>
                                    </li>
                                </c:forEach>
                            </ul>
                        </c:if>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </nav>
    <div id="page-wrapper" class="gray-bg">
        <div class="right-header" id="right-header">
            <div class="pages_tab">
                <button class="navbar-minimalize minimalize-styl-2 btn " id="silder-ctrl"><i class="fa fa-bars"></i> </button>
                <button href="javascript:void(0);" id="prev_btn"><i class="fa fa-backward"></i></button>
                <div class="tabs" id="tabs">
                    <ul class="nav nav-tabs white-bg" id="pages_tabs" role="tablist">
                        <li role="presentation" class="active border-right"><a href="#index" role="tab" data-toggle="tab">首页</a></li>
                    </ul>
                </div>
                <button role="presentation" id="next_btn"><i class="fa fa-forward"></i></button>
                <div class="btn-group" id="ctrlbtn">
                    <button type="button" class="btn dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-gear"></i> <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" id="dropdown-menu" role="menu">
                        <!-- <li><a href="#" data-close="self">关闭当前标签页</a></li> -->
                        <li><a href="#" data-close="others">关闭其他标签页</a></li>
                        <li><a href="#" data-close="all">关闭所有标签页</a></li>
                    </ul>
                </div>
            </div>
            <div class="border-bottom line"></div>
        </div>
        <div class="pages-boxes tab-content" id="pages-boxes">
            <div class="page tab-pane  animated fadeIn active" role="tabpanel" id="index">
                <c:forEach items="${modules}" var="menu">
                    <c:if test="${menu.module.title == '单位端'}"><div style="width:100%;height:96%;background:url(${ctx}/static/inspinia/img/body_bg2.png) center top no-repeat;background-size:contain;"></div></c:if>
                    <c:if test="${menu.module.title == '体检中心'}"><div style="width:100%;height:96%;background:url(${ctx}/static/inspinia/img/body_bg1.png) center top no-repeat;background-size:contain;"></div></c:if>
                    <c:if test="${menu.module.title == '系统管理'}"><div style="width:100%;height:96%;background:url(${ctx}/static/inspinia/img/body_bg.png) center top no-repeat;background-size:contain;"></div></c:if>

                </c:forEach>
            </div>
            <div class="footer" id="footer">
                <div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Mainly scripts -->
<script src="${ctx}/static/inspinia/js/jquery-2.1.1.js"></script>
<script src="${ctx}/static/inspinia/js/bootstrap.min.js"></script>
<script src="${ctx}/static/inspinia/js/pageTab.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/slimscroll/jquery.slimscroll.js"></script>
<!-- Flot -->
<script src="${ctx}/static/inspinia/js/plugins/flot/jquery.flot.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/flot/jquery.flot.spline.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/flot/jquery.flot.resize.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/flot/jquery.flot.pie.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/flot/jquery.flot.symbol.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/flot/jquery.flot.time.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/jsTree/jstree.min.js"></script>

<!-- Custom and plugin javascript -->
<script src="${ctx}/static/inspinia/js/inspinia.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/pace/pace.min.js"></script>
<!-- Sparkline -->
<script src="${ctx}/static/inspinia/js/plugins/sparkline/jquery.sparkline.min.js"></script>
<!-- layer -->
<script src="${ctx}/static/inspinia/js/plugins/layer/layer.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/toastr/toastr-ext.min.js"></script>


<script>
    $(document).ready(function() {

        var sliderHeight = document.body.clientHeight - $("#sliders_top").height();
        $('.sidebar-collapse').slimScroll({
            height: sliderHeight,
            railOpacity: 0.9
        });

        var page_height = document.body.clientHeight - 90 + "px";
        $(".page", window.parent.document).height(page_height);

    });
    
    function admin() {
        $("#H2Title").val("体检预约平台-管理端");
//        $("#bodyBG").
    }
    
    var psdchang =function(){
        layer.open({
            type: 2,
            title: "<shiro:user><shiro:principal property="name"/></shiro:user>密码修改",
            shadeClose: true,
            shade: 0.8,
            area: ['570px', '400px'],
            content: '${ctx}/admin/sys/admin/editpsd'
        });
    }
</script>
</body>

</html>

